<template>
	<view>
		<u-navbar title="商品列表"></u-navbar>
		<view style="background-color: #fff;">
			<u-dropdown>
				<u-dropdown-item v-model="value1" :title="title1" :options="options1"  @change="change1"></u-dropdown-item>
				<u-dropdown-item v-model="value2" :title="title2" :options="options2" @change="change2"></u-dropdown-item>
			</u-dropdown>
		</view>
		<view class="dis_f_co">
			<view class="dis_f_sb_c">
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value1: 1,
				value2: 2,
				title2:'综合排序',
				title1:'农副产品',
				options1: [{
						label: '默认排序',
						value: 1,
					},
					{
						label: '距离优先',
						value: 2,
					},
					{
						label: '价格优先',
						value: 3,
					}
				],
				options2: [{
						label: '综合排序',
						value: 1,
					},
					{
						label: '价格排序',
						value: 2,
					},
					{
						label: '销量排序',
						value: 3,
					}
				],
				
		};
	},
	methods:{
		change2(e){
			console.log(e)
			this.title2 = this.options2[e-1].label
		},
		change1(e){
			this.title1 = this.options1[e-1].label
		}
	}
	}
</script>

<style lang="scss">

</style>
